﻿<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>注册</title>
<link rel="Shortcut Icon" href="logo.ico"  />
<link href="css/style.css" type="text/css" rel="stylesheet" />
<script src="js/jquery-1.12.4.js" type="text/javascript"></script>
<script type="text/javascript">
function reg() {
	var phone=$("#phone").val();
	var pwd=$("#pwd").val();
	var twopwd=$("#twopwd").val();
	if (phone==""||phone==null) {
		alert("账户名不能为空");
		return false;
	}else if(pwd==""||pwd==null){
		alert("密码不能为空");
		return false;
	}else if(twopwd==""||twopwd==null){
		alert("确认密码不能为空");
		return false;
	}else if(twopwd!=pwd){
		alert("两次密码输入不一致");
		return false;
	}else{
		 $.post("../Easy_Easy_City_First_End/reg",
					{"name":phone,"pwd":pwd},
				function(data){
					if (data.result=="1") {
						alert("注册成功");	
						location.href="../Easy_Easy_City_First_End/login.jsp";
					} else {
						alert("注册失败,该用户/手机号已经存在，请重新输入用户名/手机号");
						$("#phone").select();
					}
				},"json");
		};
}
		
</script>
</head>
<body class="member">

	<div class="w1185">
    	<div class="logo"><a href="#"></a></div>
        <div class="font-d">欢迎登陆</div>
        <div class="search">
        	<form action="#" class="form">
        		<input type="text" value="输入商品关键字" name="keyword" class="txt" onfocus="if(value=='输入商品关键字') {value=''}" onblur="if(value=='') {value='输入商品关键字'}"/>
                <input type="submit" value="搜索" class="sub"/>
            </form>
        	<p><a href="#">iphone6s</a>|<a href="#">面膜</a>|<a href="#">婚庆床品</a>|<a href="#">运动鞋</a>|<a href="#">眼霜</a>|<a href="#">月饼</a>|<a href="#">智能手机</a>|<a href="#">连衣裙</a></p>
        </div>
        <div class="s_r"><img src="images/tel.jpg"/></div>
        <div class="clear"></div>
    </div>

<div class="reg">
	<div class="w1185"> 
    	<div class="left">
        	<p><b>免费注册</b></p>
            <form action="#" class="form">
                <ul>
                     <li><span><font>*</font> 用户名/手机号：</span><input type="text" id="phone" name="" class="txt"/></li>
                     <li><span><font>*</font> 请设置密码：</span><input type="password" name="" id="pwd" class="txt"/></li>
                     <li><span><font>*</font> 请确认密码：</span><input type="password" name="" id="twopwd" class="txt"/></li>
                     <!-- <li class="li03"><span><font>*</font> 验证码：</span><input type="text" name="" class="txt txt2"/><img src="images/code.jpg"/><a href="#">看不清?换一张</a></li> -->
                     <li class="li01"><input type="checkbox" value="" name="" checked="checked" disabled="disabled"/>我已阅并同意<a rel="#">《易易城用户注册协议》</a></li>
                     <li class="li02"><input type="button" id="submit" onclick="reg()" value="立即注册" class="sub"/></li> 
                </ul>
            </form>
        </div>
        <div class="right">我经注册，马上<a rel="#">登录</a></div>
        <div class="clear"></div>
    </div>
</div>

<div class="bottom">
	<a href="#">关于我们</a>|<a href="#">帮助中心</a>|<a href="#">法律声明</a>|<a href="#">用户协议</a>|<a href="#">联系我们</a>|<a href="#">人才招聘</a>|<a href="#">站点地图</a>
   
    <p>网络文化经营许可证：粤网文[2015]0295-065号<br />© 2015 深圳易易城科技网络有限公司. 粤ICP备15042543号</p>
</div>
</body>
</html>
